<?php
//测试控制器类
class IndexController extends CommonController{
    //动作方法
    public function index(){
        //显示视图
        
        $left_cate=K('Category')->get_all_data_notree(array('pid'=>0),5);
		
		foreach ($left_cate as $k => $v) {
			$left_cate[$k]['son']=K('Category')->get_all_data_notree(array('pid'=>$v['cid']));
			foreach ($left_cate[$k]['son'] as $key => $value) {
				$left_cate[$k]['son'][$key]['son']=K('Category')->get_all_data_notree(array('pid'=>$value['cid']));
			}
		}		
//			p($left_cate);
		
		$this->assign('left_cate',$left_cate);
		
		$right_list=K('Good')->get_all_data();
		$this->assign('right_list',$right_list);
		
		$slide=K('Slide')->get_all_data();
//		p($slide);

		
		$this->assign('slide',$slide);
		/*$good=K('GDGView')->get_all_data();
		$this->assign('good',$good);
		p($good);*/
        $this->dis('index');
    }
}
